home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 11
/
FM Towns Free Software Collection 11.iso
/
t_os
/
tool
/
rendezi
/
rendezi.bas
next >
Wrap
BASIC Source File
|
1995-08-18
|
20KB
|
565 lines
1000 ' save "rendezi.bas",a
1100 DIM ARGVS$(10) '読み出すパラメータの文字列
1200 GOSUB *パラメタリード
1300 IF PARA=2 THEN DLL=300*1024 ELSE DLL=0
1400 IF PARA=1 THEN WRK=100*1024 ELSE WRK=30*1024
1500 CLEAR,,512,(FRE(4)-WRK-DLL),,DLL
1600 ON ERROR GOTO *エラー処理
1700 VER$="V3.0"
1800 PRE_IN=2 : '事前取り込みコマ数の初期値
1900 GOSUB *パラメタリード
2000 GOSUB *初期化
2100 'GOSUB *音声ON
2200 *LOOP1
2300 GOSUB *メニュー
2400 *LOOP2
2500 IF IN=2 THEN
2600 X1=0:X2=159:Y1=0:Y2=119
2700 M=(X2-X1+1)*(Y2-Y1+1)
2800 NO_WORK=INT(MEM_MAX&/M/2)
2900 IF NO_WORK=0 THEN GOSUB *使用メモリ指定 :GOTO *LOOP2
3000 ENDIF
3100 GOSUB *取り込み枚数調整
3200 IF IN=3 THEN
3300 GOSUB *読み込み_1
3400 IF NO=0 THEN GOSUB *使用メモリ指定 :GOTO *LOOP2
3500 DIM A1%(M*NO)
3600 GOSUB *読み込み_2
3700 FOR I=6 TO 9 : KEY(I) ON : NEXT I : KEY(1) ON
3800 GOSUB *再生
3900 ELSE
4000 IF IN=1 THEN
4100 GOSUB *領域設定1
4200 GOSUB *領域設定2
4300 ENDIF
4400 IF NO=0 THEN GOSUB *使用メモリ指定 :GOTO *LOOP2
4500 DIM A1%(M*NO)
4600 GOSUB *音声ON
4700 GOSUB *録画
4800 GOSUB *音声OFF
4900 FOR I=6 TO 9 : KEY(I) ON : NEXT I : KEY(1) ON
5000 GOSUB *再生
5100 GOSUB *確認
5200 IF Y_N_FLAG=1 THEN *D_ERASE
5300 IF Y_N_FLAG=0 THEN
5400 GOSUB *保存
5500 ELSE
5600 GOSUB *コマ送り
5700 ENDIF
5800 ENDIF
5900 *D_ERASE
6000 ERASE A1%
6100 GOTO *LOOP1
6200 '
6300 *初期化
6400 ' keisiki:画像圧縮形式/0:TIFF圧縮なし/1:TIFF圧縮あり/2:JPEGデータ形式
6500 KEISIKI=PARA
6600 IF KEISIKI=2 THEN
6700 COMP$=".jpg" : COMP_MES$="JPEG"
6800 ELSE
6900 COMP$=".tif"
7000 IF KEISIKI=1 THEN
7100 COMP_MES$="圧縮TIFF"
7200 ELSE
7300 COMP_MES$="標準TIFF"
7400 ENDIF
7500 ENDIF
7600 SCREEN@ 1
7700 WIDTH 80,20
7800 CLS:X1=0:Y1=0:X2=159:Y2=127:COLOR 4:IN=1
7900 IF PARA=2 THEN DLL=300*1024 ELSE DLL=0
8000 IF PARA=1 THEN WRK=100*1024 ELSE WRK=30*1024
8100 F_MEM&=FRE(4)-WRK-DLL
8200 RETURN
8300 *BOX
8400 XX1=BX*4:XX2=XX1+YOKO*4:YY1=BY*12:YY2=YY1+TATE*12
8500 LINE (XX1,YY1-2)-(XX2,YY2-2),PSET,COL,BF
8600 RETURN
8700 *メニュー
8800 CLS
8900 FOR I=6 TO 9 : KEY(I) OFF : NEXT I : GOSUB *標準解像度
9000 *MENU_LOOP
9100 LOCATE 20, 4:PRINT USING " 連でじ & &/########## byte free";VER$,F_MEM&
9200 ' BX=20:BY=4:YOKO=36:TATE=1:COL=4:GOSUB *BOX
9300 LOCATE 20, 5:PRINT " 〔メニュー〕 ";
9400 PRINT USING "[ファイル形式:& &]";COMP_MES$
9500 LOCATE 20, 6:PRINT "(1)録画&再生&保存"
9600 LOCATE 20, 7:PRINT "(2)録画&再生&保存(縮小モード)"
9700 LOCATE 20, 8:PRINT "(3)読み込み&再生"
9800 LOCATE 20, 9:PRINT "(4)終了"
9900 BX=20:BY=4:YOKO=36:TATE=7:COL=1:GOSUB *BOX
10000 BX=20:BY=5+IN:YOKO=36:TATE=1:COL=7:GOSUB *BOX
10100 K$=INPUT$(1):K=ASC(K$)
10200 IF K=13 THEN *LOOP_EXIT
10300 IF K=30 THEN IN=IN-1:IF IN<1 THEN IN=1
10400 IF K=31 THEN IN=IN+1:IF IN>4 THEN IN=4
10500 GOTO *MENU_LOOP
10600 *LOOP_EXIT
10700 ON IN GOSUB *録画設定,*録画設定,*読み込み設定,*終わり
10800 ON KEY(6) GOSUB *ウエイトDOWN : ON KEY(7) GOSUB *ウエイトUP
10900 ON KEY(8) GOSUB *解像度DOWN : ON KEY(9) GOSUB *解像度UP
11000 ON KEY(1) GOSUB *再生HELP
11100 RETURN
11200 *終わり
11300 KEY(10) OFF : KEY(9) OFF : KEY(8) OFF
11400 CLS:LOCATE 24,7:PRINT "どうもご利用ありがとうございました"
11500 LOCATE 24,8:PRINT "[ NIFTY-Serve ID:HAD01045 (SAINT) ]"
11600 LOCATE 24,9:PRINT "[ PED00201 (JINX ) ]"
11700 BX=24:BY=7:YOKO=35:TATE=3:COL=1:GOSUB *BOX
11800 WAIT 300
11900 SYSTEM
12000 END
12100 *録画設定
12200 GOSUB *読み込み設定
12300 LOCATE 20,17:PRINT "録画領域設定用の画像をデジタイズします"
12400 LOCATE 20,18:PRINT "適当なところで[RETURN]を押して下さい"
12500 BX=20:BY=17:YOKO=38:TATE=2:COL=1:GOSUB *BOX
12600 WAIT 100
12700 RETURN
12800 *読み込み設定
12900 IF IN=3 THEN MES$="読込" ELSE MES$="保存"
13000 LOCATE 27,12:PRINT "〔次の項目を入力してください〕"
13100 LOCATE 15,13:PRINT USING " & &ディレクトリ :";MES$
13200 LOCATE 15,14:PRINT USING " & &ファイル名(5モジマデ):";MES$
13300 LOCATE 15,15:PRINT " デジタイズウェイト :"
13400 LOCATE 15,16:PRINT " 取り込み枚数(0:最大) :"
13500 BX=15:BY=12:YOKO=50:TATE=5:COL=1:GOSUB *BOX
13600 BX=15:BY=13:YOKO=50:TATE=1:COL=7:GOSUB *BOX
13700 *ENT_DIR
13800 DUMMY$=DIR$
13900 LOCATE 45,13:PRINT CHR$(&H1B)+"T";
14000 LOCATE 45,13:PRINT DUMMY$;
14100 LOCATE 45,13:LINE INPUT "",DIR$
14200 IF DIR$="" THEN
14300 IF DUMMY$<>""THEN
14400 DIR$=DUMMY$
14500 ELSE
14600 GOTO *ENT_DIR
14700 ENDIF
14800 ELSE
14900 IF RIGHT$(DIR$,1)<>"\" THEN
15000 DIR$=DIR$+"\"
15100 ENDIF
15200 ENDIF
15300 OPEN DIR$+")RENDEZ(.TMP" FOR OUTPUT AS #1
15400 CLOSE #1
15500 KILL DIR$+")RENDEZ(.TMP"
15600 BX=15:BY=13:YOKO=50:TATE=1:COL=1:GOSUB *BOX
15700 BX=15:BY=14:YOKO=50:TATE=1:COL=7:GOSUB *BOX
15800 DUMMY$=F$
15900 LOCATE 45,14:PRINT DUMMY$;
16000 LOCATE 45,14:LINE INPUT "",F$
16100 IF F$="" THEN
16200 IF DUMMY$<>"" THEN
16300 F$=DUMMY$
16400 ELSE
16500 GOTO 16000
16600 ENDIF
16700 ENDIF
16800 IF ERR=67 THEN RETURN
16900 BX=15:BY=14:YOKO=50:TATE=1:COL=1:GOSUB *BOX
17000 BX=15:BY=15:YOKO=50:TATE=1:COL=7:GOSUB *BOX
17100 DUMMY$=WA$
17200 LOCATE 45,15:PRINT DUMMY$;
17300 LOCATE 45,15:LINE INPUT "",WA$
17400 IF WA$="" AND DUMMY$<>"" THEN WA$=DUMMY$
17500 WA=VAL(WA$)
17600 BX=15:BY=15:YOKO=50:TATE=1:COL=1:GOSUB *BOX
17700 BX=15:BY=16:YOKO=50:TATE=1:COL=7:GOSUB *BOX
17800 DUMMY$=MAX$
17900 LOCATE 45,16:PRINT DUMMY$;
18000 LOCATE 45,16:LINE INPUT "",MAX$
18100 IF MAX$="" AND DUMMY$<>"" THEN MAX$=DUMMY$
18200 IF MAX$="M" OR MAX$="m" THEN NO_MAX=0:GOTO *使用メモリ指定
18300 NO_MAX=VAL(MAX$) : MEM_MAX&=F_MEM&
18400 RETURN
18500 *使用メモリ指定
18600 LOCATE 15,16:PRINT " 取り込みメモリ量(0:最大) :"
18700 BX=15:BY=16:YOKO=50:TATE=1:COL=7:GOSUB *BOX
18800 LOCATE 45,16:PRINT CHR$(&H1B)+"T";
18900 DUMMY$=M_MAX$
19000 LOCATE 45,16:PRINT DUMMY$;
19100 LOCATE 45,16:LINE INPUT "",M_MAX$
19200 IF M_MAX$="" AND DUMMY$<>"" THEN M_MAX$=DUMMY$
19300 MEM_MAX&=VAL(M_MAX$)
19400 IF MEM_MAX&=0 OR MEM_MAX&>F_MEM& THEN MEM_MAX&=F_MEM&
19500 RETURN
19600 *取り込み枚数調整
19700 IF NO_MAX=0 OR NO_MAX>=NO_WORK THEN
19800 NO=NO_WORK
19900 ELSE
20000 NO=NO_MAX
20100 ENDIF
20200 RETURN
20300 *領域設定1
20400 SINPUT
20500 SIMPOSE OFF
20600 *領域設定1_COM
20700 LINE (X1,Y1)-(X2,Y2),XOR,4,B
20800 M=(X2-X1+1)*(Y2-Y1+1)
20900 NO_WORK=INT(MEM_MAX&/M/2):CLS 4
21000 GOSUB *取り込み枚数調整
21100 IF IN=1 THEN DISP$="録画面積"
21200 IF IN=2 THEN DISP$="画像大きさ"
21300 LOCATE 0,18:PRINT "カーソルキーで";DISP$;"を調整して下さい";
21400 IF IN=1 THEN LOCATE 0,19:PRINT "録画画面枚数="+STR$(NO)+"枚まで可能です";
21500 K$=INKEY$:IF K$="" THEN 21500 ELSE K=ASC(K$)
21600 LINE (X1,Y1)-(X2,Y2),XOR,4,B
21700 IF K=13 THEN RETURN
21800 IF K=29 THEN X2=X2-8 : IF X2<X1 THEN X2=X2+8
21900 IF K=28 THEN X2=X2+8 : IF X2>319 THEN X2=X2-8
22000 IF K=30 THEN Y2=Y2-8 : IF Y2<Y1 THEN Y2=Y2+8
22100 IF K=31 THEN Y2=Y2+8 : IF Y2>239 THEN Y2=Y2-8
22200 GOTO *領域設定1_COM
22300 *領域設定2
22400 LINE (X1,Y1)-(X2,Y2),XOR,4,B
22500 LOCATE 0,18:PRINT "カーソルキーで録画位置を調整して下さい";
22600 LOCATE 0,19:PRINT "録画画面枚数="+STR$(NO)+"枚まで可能です";
22700 WHILE INKEY$<>"":WEND
22800 K$=INKEY$:IF K$="" THEN 22800 ELSE K=ASC(K$)
22900 LINE (X1,Y1)-(X2,Y2),XOR,4,B
23000 IF K=27 THEN RETURN 4100
23100 IF K=29 THEN X1=X1-1:X2=X2-1 : IF X1<0 THEN X1=X1+1:X2=X2+1
23200 IF K=28 THEN X1=X1+1:X2=X2+1 : IF X2>319 THEN X1=X1-1:X2=X2-1
23300 IF K=30 THEN Y1=Y1-1:Y2=Y2-1 : IF Y1<0 THEN Y1=Y1+1:Y2=Y2+1
23400 IF K=31 THEN Y1=Y1+1:Y2=Y2+1 : IF Y2>239 THEN Y1=Y1-1:Y2=Y2-1
23500 IF K<>13 THEN 22400
23600 CLS 4:LOCATE 20,17:PRINT "次に録画を開始します"
23700 LOCATE 20,18:PRINT "適当なところで[RETURN]を押して下さい"
23800 BX=20:BY=17:YOKO=38:TATE=2:COL=1:GOSUB *BOX
23900 WAIT 100
24000 RETURN
24100 *録画
24200 WHILE INKEY$<>"":WEND:SIMPOSE 3
24300 IF IN=2 THEN
24400 OUT &H440,27,1
24500 OUT &H442,&H0017,2
24600 ENDIF
24700 LOOP=1 : LOOP_FLAG=0 : FIN_FLAG=0
24800 WHILE LOOP_FLAG=0
24900 K_IN$=INKEY$
25000 GET@A (X1,Y1)-(X2,Y2),A1%,(M*(LOOP-1))
25100 IF WA THEN WAIT WA
25200 IF K_IN$=CHR$(&H1B) THEN LOOP_FLAG=-1
25300 IF K_IN$=CHR$(&H0D) THEN LOOP_FLAG=99
25400 LOOP=LOOP+1
25500 IF LOOP>NO THEN LOOP=1 : FIN_FLAG=-1
25600 WEND
25700 IF LOOP_FLAG=-1 THEN RETURN *D_ERASE
25800 'stage 1 ----------
25900 LOOP_START1=LOOP
26000 IF FIN_FLAG AND LOOP_START1=<PRE_IN THEN
26100 LOOP_END1=NO-PRE_IN+LOOP_START1-1
26200 ELSE
26300 LOOP_END1=NO
26400 ENDIF
26500 FOR LOOP=LOOP_START1 TO LOOP_END1
26600 GET@A (X1,Y1)-(X2,Y2),A1%,(M*(LOOP-1))
26700 IF WA THEN WAIT WA
26800 NEXT LOOP
26900 'stage 2 ----------
27000 IF LOOP_START1>PRE_IN+1 THEN
27100 LOOP_START2=1
27200 LOOP_END2=LOOP_START1-PRE_IN-1
27300 LOOP_START0=LOOP_END2+1
27400 IF LOOP_START0>NO THEN LOOP_START0=1
27500 FOR LOOP=LOOP_START2 TO LOOP_END2
27600 GET@A (0,0)-(159,119),A1%,(M*(LOOP-1))
27700 IF WA THEN WAIT WA
27800 NEXT LOOP
27900 ENDIF
28000 RETURN
28100 '
28200 *コマ送り
28300 SIMPOSE OFF : CLS : LOOP=1
28400 *コマLOOP
28500 GOSUB *ヒトコマ再生
28600 A$=INKEY$ : WHILE A$="" : A$=INKEY$ :WEND
28700 IF A$=CHR$(&H1B) THEN RETURN
28800 IF A$=CHR$(&H0D) THEN LOOP1=LOOP : GOSUB *ヒトコマ保存
28900 IF A$=CHR$(&H1F) THEN LOOP=LOOP+1
29000 IF A$=CHR$(&H1E) THEN LOOP=LOOP-1
29100 IF LOOP=0 THEN LOOP=NO
29200 IF LOOP>NO THEN LOOP=1
29300 GOTO *コマLOOP
29400 *ヒトコマ再生
29500 LOCATE 68,24 : PRINT USING "#####/#####";LOOP,NO;
29600 X_OFST=INT(319/(倍率+1-(倍率=0))-(X1+X2)/2)
29700 Y_OFST=INT(239/(倍率+1-(倍率=0))-(Y1+Y2)/2)
29800 PUT@A (X1+X_OFST,Y1+Y_OFST)-(X2+X_OFST,Y2+Y_OFST),A1%,,,,,(M*(LOOP-1))
29900 RETURN
30000 *コマ送り2
30100 'SIMPOSE OFF : CLS : LOOP=1
30200 *コマLOOP2
30300 GOSUB *ヒトコマ再生
30400 A$=INKEY$ : WHILE A$="" : A$=INKEY$ :WEND
30500 IF A$=CHR$(&H1B) THEN LOCATE 68,24 : PRINT " ";: RETURN
30600 IF A$=CHR$(&H1F) THEN LOOP=LOOP+1
30700 IF A$=CHR$(&H1E) THEN LOOP=LOOP-1
30800 IF LOOP=0 THEN LOOP=NO
30900 IF LOOP>NO THEN LOOP=1
31000 GOTO *コマLOOP2
31100 *再生
31200 X_OFST=INT(319/2-(X1+X2)/2) : Y_OFST=INT(239/2-(Y1+Y2)/2)
31300 SIMPOSE OFF:CLS:WHILE INKEY$<>"":WEND
31400 CHECK$=CHR$(13)+CHR$(27)+CHR$(28)+CHR$(29)+CHR$(30)+CHR$(31)+CHR$(32)+CHR$(9)+CHR$(52)+CHR$(54)+CHR$(56)+CHR$(50)
31500 FOR LOOP=1 TO NO
31600 PUT@A (X1+X_OFST,Y1+Y_OFST)-(X2+X_OFST,Y2+Y_OFST),A1%,,,,,(M*(LOOP-1))
31700 K$=INKEY$:IF K$="" THEN 33400
31800 CHECK=INSTR(CHECK$,K$)
31900 IF CHECK=1 THEN RETURN
32000 IF CHECK=2 THEN
32100 IF IN MOD 2=1 THEN
32200 RETURN 4700
32300 ELSE
32400 IF IN MOD 2=0 THEN ERASE A1%:RETURN 2200
32500 ENDIF
32600 ENDIF
32700 IF CHECK=3 THEN GOSUB *ウエイトUP
32800 IF CHECK=4 THEN GOSUB *ウエイトDOWN
32900 IF CHECK=5 THEN GOSUB *解像度UP
33000 IF CHECK=6 THEN GOSUB *解像度DOWN
33100 IF CHECK=7 THEN GOSUB *PAUSE
33200 IF CHECK=8 THEN GOSUB *コマ送り2
33300 IF CHECK>8 AND CHECK<13 THEN GOSUB *スクロール
33400 IF WA THEN WAIT WA
33500 NEXT LOOP:GOTO 31500
33600 '
33700 *ヒトコマ保存
33800 LOOP_WORK=LOOP1-LOOP_START0+1
33900 IF LOOP_WORK<1 THEN LOOP_WORK=LOOP_WORK+NO
34000 NO$=RIGHT$("000"+MID$(STR$(LOOP_WORK),2),3)
34100 SAVE@ DIR$+F$+NO$+COMP$,(X1+X_OFST,Y1+Y_OFST)-(X2+X_OFST,Y2+Y_OFST),,KEISIKI
34200 RETURN
34300 *保存
34400 CLS
34500 FOR LOOP1=1 TO NO
34600 PUT@A (X1+X_OFST,Y1+Y_OFST)-(X2+X_OFST,Y2+Y_OFST),A1%,,,,,(M*(LOOP1-1))
34700 GOSUB *ヒトコマ保存
34800 NEXT LOOP1
34900 RETURN
35000 *読み込み_1
35100 CLS
35200 LOAD@ DIR$+F$+"001"+COMP$
35300 FILE$=DIR$+F$+"001"+COMP$
35400 IF COMP$=".tif" THEN GOSUB *TIFF_DOT ELSE GOSUB *JPEG_DOT
35500 X1=0:Y1=0:X2=XSIZE:Y2=YSIZE
35600 M=(X2-X1+1)*(Y2-Y1+1)
35700 NO=INT(MEM_MAX&/M/2):CLS 4
35800 RETURN
35900 *読み込み_2
36000 LOCATE 0,18:PRINT CHR$(&H1B)+"T";
36100 LOCATE 0,18:PRINT "画像ファイルを読み込み中です"
36200 FOR LOOP1=1 TO NO
36300 NO$=RIGHT$("000"+MID$(STR$(LOOP1),2),3)
36400 LOAD@ DIR$+F$+NO$+COMP$
36500 GET@A (X1,Y1)-(X2,Y2),A1%,(M*(LOOP1-1))
36600 NEXT LOOP1
36700 RETURN
36800 *パラメタリード
36900 DEF FNARGC& = PEEK(PEEK(VARPTR(SYSTEM,6) - 8,4),4)
37000 DEF FNARGV& = PEEK(PEEK(VARPTR(SYSTEM,6) - 8,4) - 4,4)
37100 ARGC& = FNARGC& : 'PRINT "パラメータ数",HEX$(ARGC&) ' argc
37200 ARGV& = FNARGV& : 'PRINT HEX$(ARGV&) ' argvのアドレス
37300 IF ARGC& < 1 THEN PRINT "noting":END
37500 FOR I=1 TO ARGC&-1
37600 ARGVX& = PEEK((ARGV&+I*4),4)
37700 ARGVS$(I) = ""
37800 M& = 1
37900 WHILE (M& <> 0)
38000 M& = PEEK((ARGVX&),1)
38100 ARGVS$(I) = ARGVS$(I)+CHR$(M&) : ARGVX&=ARGVX&+1
38200 WEND
38300 NAM$=ARGVS$(I)
38400 IF LEN(NAM$)>2 AND LEFT$(NAM$,1)="/" THEN
38500 WORK=INSTR("EePp",MID$(NAM$,2,1))
38600 IF WORK=1 OR WORK=2 THEN PARA=VAL(MID$(NAM$,3))
38700 IF WORK=3 OR WORK=4 THEN PRE_IN=VAL(MID$(NAM$,3))
38800 ENDIF
38900 ' PRINT NAM$
39000 NEXT I
39100 ' PRINT USING "PARA=#### PRE__IN=####";PARA,PRE_IN : A$=INPUT$(1)
39200 RETURN
39300 *確認
39400 LOCATE 20,24:PRINT "保存しますか?< y / n / s >";
39500 A$=INPUT$(1) : A=INSTR("YyNnSs",A$)
39600 IF A=0 THEN BEEP : GOTO 39500
39700 Y_N_FLAG=(A-1) \ 2
39800 RETURN
39900 *ウエイトUP
40000 KEY(6) OFF
40100 WA=WA+1 : LOCATE 60,24:PRINT USING "WAIT=#####";WA;
40200 KEY(6) ON
40300 RETURN
40400 *ウエイトDOWN
40500 KEY(7) OFF
40600 WA=WA-1 : IF WA<0 THEN WA=0
40700 LOCATE 60,24:PRINT USING "WAIT=#####";WA;
40800 KEY(7) ON
40900 RETURN
41000 *標準解像度
41100 OUT &H440,27,1 : OUT &H442,17,2 : 倍率=1 : SCREEN@ 1,0
41200 RETURN
41300 *解像度DOWN
41400 KEY(8) OFF : OUT &H440,17:OUT &H442,0,2
41500 YOKO_OFFSET=0 : TATE_OFFSET=0
41600 YOKO_OFFSET=0 : TATE_OFFSET=0
41700 倍率=倍率-1 : IF 倍率<0 THEN 倍率=0
41800 X_OFST=INT(319/(倍率+1-(倍率=0))-(X1+X2)/2)
41900 Y_OFST=INT(239/(倍率+1-(倍率=0))-(Y1+Y2)/2)
42000 CLS 5
42100 IF 倍率<>0 THEN
42200 SCREEN@ 1,0:OUT &H440,27,1 : OUT &H442,17*倍率,2
42300 ELSE
42400 SCREEN@ 1,1,(128,112)
42500 ENDIF
42600 KEY(8) ON
42700 RETURN
42800 *解像度UP
42900 YOKO_OFFSET=0 : TATE_OFFSET=0
43000 KEY(9) OFF : OUT &H440,17:OUT &H442,0,2
43100 YOKO_OFFSET=0 : TATE_OFFSET=0
43200 倍率=倍率+1 : IF 倍率>3 THEN 倍率=3
43300 X_OFST=INT(319/(倍率+1-(倍率=0))-(X1+X2)/2)
43400 Y_OFST=INT(239/(倍率+1-(倍率=0))-(Y1+Y2)/2)
43500 CLS 5:SCREEN@ 1,0:OUT &H440,27,1 : OUT &H442,17*倍率,2
43600 KEY(9) ON
43700 RETURN
43800 *音声ON
43900 KEY(10) OFF
44000 OUT &H04E1,&H04
44100 OUT &H04E0,&HFF
44200 OUT &H04E1,&H05
44300 OUT &H04E0,&HFF
44400 ON KEY(10) GOSUB *音声OFF
44500 KEY(10) ON
44600 RETURN
44700 *音声OFF
44800 KEY(10) OFF
44900 OUT &H04E1,&H04
45000 OUT &H04E0,&H00
45100 OUT &H04E1,&H05
45200 OUT &H04E0,&H00
45300 ON KEY(10) GOSUB *音声ON
45400 KEY(10) ON
45500 RETURN
45600 *PAUSE
45700 LOCATE 70,24:PRINT "PAUSE";
45800 IN$=INPUT$(1)
45900 LOCATE 70,24:PRINT " ";
46000 RETURN
46100 *スクロール
46200 WHILE INKEY$<>"":WEND
46300 YOKO_OFFSET=YOKO_OFFSET-(CHECK=9)*2+(CHECK=10)*2
46400 TATE_OFFSET=TATE_OFFSET-(CHECK=11)*2+(CHECK=12)*2
46500 OFFSET=TATE_OFFSET*256+YOKO_OFFSET
46600 OUT &H440,17:OUT &H442,OFFSET,2
46700 RETURN
46800 *再生HELP
46900 IF HELP_FLAG=0 THEN
47000 COLOR 14
47100 LOCATE 0,14:PRINT " 『連でじ再生HELP』 ";
47200 LOCATE 0,15:PRINT "ウェイト変更 [←]&[→]";
47300 LOCATE 0,16:PRINT "解像度変更 [↑]&[↓]";
47400 LOCATE 0,19:PRINT "スクロール [2][4][6][8]";
47500 LOCATE 0,17:PRINT "一時停止 [SPACE]";
47600 LOCATE 0,18:PRINT "コマ送り再生 [TAB] ";
47700 LOCATE 0,19:PRINT "スクロール [2][4][6][8]";
47800 HELP_FLAG=1:COLOR 4
47900 ELSE
48000 CLS 4:HELP_FLAG=0
48100 ENDIF
48200 RETURN
48300 *JPEG_DOT
48400 ' FILE$="ファイル名"
48500 OPEN "I",#1,FILE$
48600 '
48700 *JPEG_MARKER
48800 D$=""
48900 WHILE D$<>CHR$(&HFF):D$=INPUT$(1,1):WEND 'マーカーを探す
49000 MARK$=INPUT$(1,1)
49100 IF MARK$=CHR$(&HC0) THEN *SOF0 'Start Of Frame
49200 IF MARK$=CHR$(&HD8) THEN *JPEG_MARKER 'Start Of Image
49300 '
49400 SIZE=ASC(INPUT$(1,1))*256+ASC(INPUT$(1,1))-2
49500 FOR I=1 TO SIZE:D$=INPUT$(1,1):NEXT
49600 GOTO *JPEG_MARKER
49700 '
49800 *SOF0
49900 SIZE=ASC(INPUT$(1,1))*256+ASC(INPUT$(1,1))-2
50000 D$=INPUT$(1,1)
50100 YSIZE=ASC(INPUT$(1,1))*256+ASC(INPUT$(1,1))
50200 XSIZE=ASC(INPUT$(1,1))*256+ASC(INPUT$(1,1))
50300 '
50400 PRINT USING "画像の大きさ=(#### * ####)";XSIZE;YSIZE
50500 '
50600 CLOSE
50700 RETURN
50800 *TIFF_DOT
50900 ' FILE$="ファイル名"
51000 DEF FNGETC=ASC(INPUT$(1,1))
51100 DEF FNGETSHORT=FNGETC+FNGETC*256
51200 DEF FNGETLONG=FNGETSHORT+FNGETSHORT*65536
51300 OPEN "I",#1,FILE$
51400 *TIFF_MARKER
51500 A$=INPUT$(4,1)
51600 IF A$<>"II"+CHR$(&H2A)+CHR$(&H0) THEN PRINT "TIFFでない":GOTO 57200
51700 IFDPOS=FNGETLONG
51800 IF IFDPOS>8 THEN A$=INPUT$(IFDPOS-8,1)
51900 TAGNUM=FNGETSHORT
52000 FOR I=0 TO TAGNUM-1
52100 TAGID=FNGETSHORT
52200 TAGTYPE=FNGETSHORT
52300 TAGDATNUM=FNGETLONG
52400 TAGDAT=FNGETSHORT
52500 A=FNGETSHORT
52600 IF TAGID=&H100 THEN XSIZE=TAGDAT
52700 IF TAGID=&H101 THEN YSIZE=TAGDAT
52800 IF TAGID=&H102 THEN
52900 IF TAGTYPE=3 AND TAGDATNUM=1 THEN
53000 IF TAGDAT=1 THEN COLTYPE=2
53100 IF TAGDAT=4 THEN COLTYPE=16
53200 IF TAGDAT=8 THEN COLTYPE=256
53300 IF TAGDAT=16 THEN COLTYPE=32768
53400 ELSE
53500 IF TAGTYPE=3 AND TAGDATNUM=3 THEN COLTYPE=16770000
53600 ENDIF
53700 ENDIF
53800 NEXT
53900 PRINT USING "画像の大きさ=(#### * ####)";XSIZE;YSIZE
54000 PRINT USING "色数(########)";COLTYPE
54100 CLOSE
54200 RETURN
54300 *エラー処理
54400 IF ERL=34100 AND ERR=64 THEN KILL DIR$+F$+NO$+COMP$:RESUME 34100
54500 IF ERL=36400 THEN NO=LOOP1-1:RESUME 36700
54600 IF ERL=35200 AND ERR=63 THEN
54700 PRINT "指定ファイルが見つかりません"
54800 PRINT "何かキーを押してください"
54900 A$=INPUT$(1)
55000 GOSUB *読み込み設定 : CLS
55100 RESUME
55200 ENDIF
55300 IF ERR=67 THEN
55400 PRINT "ディスクに空き領域が無くなりました。"
55500 PRINT "<ESC>:中断 <SPACE>:保存先指定を変更"
55600 A$=INPUT$(1)
55700 IF A$=CHR$(&H1B) THEN RESUME 2200
55800 IF A$=" " THEN GOSUB *読み込み設定 : RESUME
55900 ENDIF
56000 IF ERL=15300 THEN BEEP:RESUME *ENT_DIR
56100 IF ERR=67 THEN
56200 LOCATE 0,0:PRINT "ディスクに空き領域が無くなりました。"
56300 PRINT "<ESC>:中断 <SPACE>:保存先指定を変更(残りのみ)"
56400 A$=INPUT$(1)
56500 IF A$=CHR$(&H1B) THEN CLS:RESUME 5900
56600 IF A$=" " THEN GOSUB *読み込み設定 : RESUME
56700 ENDIF
56800 OPEN "RNDZ_ERR.LOG" FOR APPEND AS #1
56900 PRINT #1,USING "& & & & ver.=& & ERR=######## ERL=########";DATE$,TIME$,VER$,ERR,ERL
57000 CLOSE
57100 CLS
57200 ON ERROR GOTO 0
57300 PRINT USING "エラーです ERR=######## ERL=########";ERR,ERL
57400 STOP